package controller;

import javax.microedition.midlet.MIDlet;

import util.MoneyControlConstants;

import com.sun.lwuit.events.ActionEvent;
import com.sun.lwuit.events.ActionListener;

public class BankHandler implements ActionListener
{
	private MIDlet midlet;
	
	public BankHandler(MIDlet m)
	{
		this.midlet = m;
	}
	
	public void actionPerformed(ActionEvent e)
	{
		
		if( (e.getCommand() != null) && (e.getCommand().getCommandName().equals(MoneyControlConstants.TEXT_COMMAND_SAIR)))
		{
			this.midlet.notifyDestroyed();
		}
		
	}
	
	public MIDlet getMidlet()
	{
		return midlet;
	}

	public void setMidlet(MIDlet midlet)
	{
		this.midlet = midlet;
	}
	
}
